const globs = import.meta.glob("./modules/*.ts", {
  eager: true
});
interface IApi {
  user?: any;
  [k: string]: any;
}

const modules: IApi = {};
for (const path in globs) {
  const mod = globs[path];
  const key = path.match(new RegExp("./modules/(.*).ts"))[1];
  if (key) {
    modules[key] = mod;
  }
}

export default modules;
